home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / earcd / utils / vinced / include / window.h < prev   
C/C++ Source or Header  |  1997-07-29  |  31KB  |  792 lines

  1. #ifndef VNC_WINDOW_H
  2. #define VNC_WINDOW_H
  3. /*********************************************************
  4.  ** ViNCEd                                              **
  5.  ** a DOS - window handler                              **
  6.  **                                                     **
  7.  ** © 1991-97 THOR-Software inc.                        **
  8.  ** Version 3.40                                        **
  9.  **                                                     **
  10.  ** program version 1.23 05/03/91       THOR            **
  11.  ** update  version 1.25 06/19/91       THOR            **
  12.  ** header file 06/19/91                THOR            **
  13.  ** updated to 3.30      03/31/97       THOR            **
  14.  ** updated to 3.40      05/05/97       THOR            **
  15.  ** updated to 3.41      05/19/97       THOR            **
  16.  **                                                     **
  17.  ** ViNCEd Window: The main structure (vcn)             **
  18.  **-----------------------------------------------------**
  19.  **                                                     **
  20.  ** all use at your own risk,etc.,etc.                  **
  21.  **                                                     **
  22.  ** Everything declared as "reserved" or                **
  23.  ** "not used" is NOT free for your use,                **
  24.  ** it will propably used in a later release.           **
  25.  ** All FREE entries are free for public                **
  26.  ** use and are, if not otherwise noted,                **
  27.  ** initialized with ZERO                               **
  28.  *********************************************************/
  29.  
  30. #ifndef EXEC_TYPES_H
  31. #include <exec/types.h>
  32. #endif
  33.  
  34. #ifndef EXEC_LIBRARIES_H
  35. #include <exec/libraries.h>
  36. #endif
  37.  
  38. #ifndef EXEC_PORTS_H
  39. #include <exec/ports.h>
  40. #endif
  41.  
  42. #ifndef EXEC_SEMAPHORES_H
  43. #include <exec/semaphores.h>
  44. #endif
  45.  
  46. #ifndef EXEC_IO_H
  47. #include <exec/io.h>
  48. #endif
  49.  
  50. #ifndef EXEC_DEVICES_H
  51. #include <exec/devices.h>
  52. #endif
  53.  
  54. #ifndef DEVICES_TIMER_H
  55. #include <devices/timer.h>
  56. #endif
  57.  
  58. #ifndef DEVICES_CONSOLE_H
  59. #include <devices/console.h>
  60. #endif
  61.  
  62. #ifndef DEVICES_CONUNIT_H
  63. #include <devices/conunit.h>
  64. #endif
  65.  
  66. #ifndef DEVICES_KEYMAP_H
  67. #include <devices/keymap.h>
  68. #endif
  69.  
  70. #ifndef GRAPHICS_CLIP_H
  71. #include <graphics/clip.h>
  72. #endif
  73.  
  74. #ifndef GRAPHICS_GFX_H
  75. #include <graphics/gfx.h>
  76. #endif
  77.  
  78. #ifndef GRAPHICS_RASTPORT_H
  79. #include <graphics/rastport.h>
  80. #endif
  81.  
  82. #ifndef GRAPHICS_TEXT_H
  83. #include <graphics/text.h>
  84. #endif
  85.  
  86. #ifndef UTILITY_TAGITEM_H
  87. #include <utility/tagitem.h>
  88. #endif
  89.  
  90. #ifndef INTUITION_INTUITION_H
  91. #include <intuition/intuition.h>
  92. #endif
  93.  
  94. #ifndef INTUITION_SCREENS_H
  95. #include <intuition/screens.h>
  96. #endif
  97.  
  98. #ifndef DOS_DOS_H
  99. #include <dos/dos.h>
  100. #endif
  101.  
  102. #ifndef DOS_DOSEXTENS_H
  103. #include <dos/dosextens.h>
  104. #endif
  105.  
  106. #ifndef WORKBENCH_WORKBENCH_H
  107. #include <workbench/workbench.h>
  108. #endif
  109.  
  110. #ifndef VNC_VNCBASE_H
  111. #include <vnc/vncbase.h>
  112. #endif
  113.  
  114. #ifndef VNC_PREFS_H
  115. #include <vnc/prefs.h>
  116. #endif
  117.  
  118. #ifndef VNC_OWNER_H
  119. #include <vnc/owner.h>
  120. #endif
  121.  
  122. #ifndef VNC_DYNAMICS_H
  123. #include <vnc/dynamics.h>
  124. #endif
  125.  
  126.  
  127. /* This is the description of the main structure of ViNCEd, the
  128.    ViNCWindow. It is linked to a group of "owners" that share
  129.    a common output window. This window is described by this structure */
  130.  
  131. struct ViNCWindow {
  132.         struct ViNCWindow       *vcn_succ,*vcn_pred; /* linked list in
  133.                                                         library base */
  134.         UWORD                    vcn_Version;        /* version information */
  135.         UWORD                    vcn_Revision;
  136.         struct SignalSemaphore   vcn_Semaphore;      /* access grant. DO
  137.                                                         NOT TOUCH. Use
  138.                                                         LockWindow(),
  139.                                                         UnLockWindow()! */
  140.         UWORD                    vcn_OpenCount;      /* times DOS Open'd
  141.                                                         this. No lock count,
  142.                                                         no asyncs here */
  143.  
  144. /* base pointers */
  145.         struct VNCBase          *vcn_VNCBase;        /* library base */
  146.         struct ViUserNode       *vcn_UserNode;       /* for you. See below*/
  147.  
  148. /* important flags */
  149.         ULONG                    vcn_Flags;
  150.         ULONG                    vcn_ExtFlags;       /* even more */
  151.         ULONG                    vnc_EventFlags;     /* received events */
  152.         ULONG                    vcn_DOSFlags;       /* much more */
  153.         ULONG                    vcn_RequestedEvents;/* receive which input
  154.                                                         events */
  155.  
  156. /* links to the system */
  157.         struct Window           *vcn_Window;    /* the intuition window,
  158.                                                    if open */
  159.         struct ViNCNewWindow    *vcn_NewWindow; /* temporary for reopen */
  160.         struct RastPort         *vcn_RastPort;  /* private one, for drawing*/
  161.         struct Layer            *vcn_Layer;     /* the layer */
  162.         struct Screen           *vcn_Screen;    /* the screen the window is
  163.                                                    displayed on, if open */
  164.         struct TmpRas           *vcn_TmpRas;    /* used to speedup
  165.                                                    scrolling */
  166.         struct TextFont         *vcn_TextFont;  /* text used for rendering*/
  167.         void                    *vcn_MemPool;   /* ViNCEd's private memory
  168.                                                    pool. Do not touch, THIS
  169.                                                    IS NOT EXEC COMPATIBLE */
  170.  
  171.         struct DosList          *vcn_DeviceNode; /* no BPTR! Pointer to
  172.                                                     dos device entry */
  173.  
  174.         struct ConUnit          *vcn_ConUnit;   /* ConUnit for backwards
  175.                                                    compatibility */
  176.  
  177.         struct KeyMap           *vcn_KeyMap;    /* used keyboard */
  178.  
  179.         UWORD                   *vcn_TabStops;  /* array of TAB positions*/
  180.  
  181. /* size of window and font */
  182.  
  183.         UWORD                    vcn_TXSize;
  184.         UWORD                    vcn_TYSize;    /* Size of the font */
  185.  
  186.         UWORD                    vcn_TBaseLine; /* text base line */
  187.  
  188.         UWORD                    vcn_TotalCount;/* total open count of
  189.                                                    all structures.
  190.                                                    The handler is allowed
  191.                                                    to leave not until this
  192.                                                    is zero */
  193.         UWORD                    vcn_LeftOffset;/* text starting offset
  194.                                                    in the window */
  195.         UWORD                    vcn_TopOffset; /* same, but vertical */
  196.         UWORD                    vcn_RightOffset;
  197.         UWORD                    vcn_BottomOffset; /* for mini clipping */
  198.  
  199.         UWORD                    vcn_Width;
  200.         UWORD                    vcn_Height;    /* available area for
  201.                                                    drawing in pixels */
  202.  
  203.         UWORD                    vcn_CWidth;
  204.         UWORD                    vcn_CHeight;   /* same in characters */
  205.  
  206.         UWORD                    vcn_BProtLeft;
  207.         UWORD                    vcn_BProtTop;
  208.         UWORD                    vcn_BPropRight;
  209.         UWORD                    vcn_BPortBottom;
  210.                                                 /* border protection
  211.                                                    zone, against
  212.                                                    italic characters */
  213.  
  214.         UWORD                    vcn_RightScroll;
  215.         UWORD                    vcn_LeftScroll;/* scrolling margins*/
  216.  
  217. /* system lists */
  218.  
  219.         struct MinList           vcn_reservedlist;
  220.         struct MinList           vcn_MemBlockList; /* dynamic memory pool*/
  221.         struct MinList           vcn_InputBList;   /* history lines */
  222.         struct MinList           vcn_ButtonList;   /* buttons */
  223.         struct MinList           vcn_ReceivedReads;/* Read() pkt's Q here */
  224.         struct MinList           vcn_ReceivedWrites;/* Write()'s Q here */
  225.         struct MinList           vcn_OwnerList;    /* list of owners, i.e.
  226.                                                       named consoles.
  227.                                                       !WARNING! Semaphore
  228.                                                       protected! DO NOT
  229.                                                       TOUCH! LockWindow()
  230.                                                       is NOT ENOUGH here! */
  231.         struct MinList           vcn_UpperLineList;/* upper lines */
  232.         struct MinList           vcn_LowerLineList;/* lower lines */
  233.         struct MinList           vcn_Spare2List;   /* also free */
  234.         struct MinList           vcn_HookList;     /* window wide hooks */
  235.         struct MinList           vcn_MacroList;    /* user macros */
  236.  
  237. /* position of window & cursor */
  238.  
  239.         UWORD                    vcn_CursorX;
  240.         UWORD                    vcn_CursorY;      /* cursor position */
  241.         UWORD                    vcn_ScrollX;      /* horizontal scrolling */
  242.         UWORD                    vcn_GfxScrollX;   /* and what's seen on
  243.                                                       the screen */
  244.  
  245.         UWORD                    vcn_SearchX;      /* private for pattern
  246.                                                      searching */
  247.         UWORD                    vcn_DOSX;      /* DOS cursor location for
  248.                                                      mask input hack */
  249.  
  250.         UBYTE                    vcn_RefreshBits; /* window refresh mode,
  251.                                                      see below */
  252.         UBYTE                    vcn_RefreshCounter;/* times the refresh
  253.                                                       was requested */
  254.         UWORD                    vcn_DeltaScroll;   /* amount of lines
  255.                                                       scrolled while output
  256.                                                       disabled */
  257.         UWORD                    vcn_BlockX;
  258.         UWORD                    vcn_BlockY;  /* position of end of block */
  259.  
  260.         UWORD                    vcn_MenuNumber; /* menu selected last */
  261.         UWORD                    vcn_MenuQualifier; /* last menu qualifier */
  262.  
  263.         struct Gadget           *vcn_PressedGadget; /* gadget hold down, or
  264.                                                       NULL */
  265.  
  266. /* colors and types. All come in packed version, see vnc/dynamics.h */
  267.  
  268.         UBYTE                    vcn_ActualLineType; /* copy of cur. line */
  269.         UBYTE                    vcn_ActualLineMask; /* bitplane mask */
  270.  
  271.         UBYTE                    vcn_ActualPenPair; /* colors and */
  272.         UBYTE                    vcn_ActualType;    /* draw mode, packed*/
  273.  
  274.         UBYTE                    vcn_UserPenPair;
  275.         UBYTE                    vcn_UserType;   /* input style characters*/
  276.  
  277.         UBYTE                    vcn_DOSPenPair;
  278.         UBYTE                    vcn_DOSType;    /* dos (output) char's */
  279.  
  280.         UBYTE                    vcn_BackFillPenPair;
  281.         UBYTE                    vcn_BackFillType;  /* only BPen used */
  282.  
  283.         UBYTE                    vcn_PlaneMaskPenPair;
  284.         UBYTE                    vcn_PlaneMaskType;
  285.                                         /* used for concurrent mode */
  286.  
  287. /* actual lines, in the screen and in the buffer,
  288.    line pointers, get adjusted if lines move in memory.
  289.    See dynamics.h */
  290.  
  291.         struct DynLine          *vcn_ActualLine; /* or NULL */
  292.         struct DynLine          *vcn_ActualInput; /* current history line */
  293.         struct DynLine          *vcn_LinePtr;    /* general purpose
  294.                                                    auto adjust pointer */
  295.         struct DynLine          *vcn_AnchorLine; /* for block marking */
  296.  
  297.         UWORD                    vcn_ActualY;    /* position of line in
  298.                                                    buffer */
  299.         UWORD                    vcn_AnchorLineX;/* reserved */
  300.         UWORD                    vcn_AnchorX;
  301.         UWORD                    vcn_AnchorY;    /* anchor position of
  302.                                                    current block */
  303.  
  304. /* line counters and thresholds */
  305.         UWORD                    vcn_InpCount;  /* current size of history */
  306.         UWORD                    vcn_InpMax;    /* maximal size of history */
  307.  
  308.         UWORD                    vcn_UpperCount;
  309.         UWORD                    vcn_UpperMax;   /* same for upper lines */
  310.  
  311.         UWORD                    vcn_LowerCount;
  312.         UWORD                    vcn_LowerMax;   /* same for lower lines */
  313.  
  314.  
  315. /* internal buffers and their size */
  316.         struct  VCharLine       *vcn_EditBuffer; /* contains current line */
  317.         char                    *vcn_SearchBuffer; /* for history search */
  318.         char                    *vcn_RawKeyBuffer; /* for RawKeyConvert */
  319.  
  320.         char                    *vcn_BufObsolete[4];
  321.  
  322.         char                    *vcn_CutBuffer;  /* for ^K, ^Y */
  323.         char                    *vcn_CommandBuffer; /* reserved */
  324.         char                    *vcn_WindowTitle;
  325.         char                    *vcn_ScreenTitle;
  326.         char                    *vcn_PubScreenName; /* like it says */
  327.  
  328.         char                    *vnc_ProjectName;   /* last name used for */
  329.                                                     /* open or empty string */
  330.                                                     /* 256 bytes long */
  331.         char                    *vcn_HistoryName;   /* last name used */
  332.                                                     /* for the history */
  333.         struct Message          *vcn_CurrentSnip;   /* snip in progress. Private */
  334.         struct DynLine          *vnc_TABLinePtr;    /* strictly for the TABHook */
  335.  
  336.         char                    *vcn_MObsolete[6];  /* six obsolete pointers */
  337.  
  338.         UWORD                    vcn_EditSize;   /* size of EditBuffer */
  339.         UWORD                    vcn_SearchSize;
  340.         UWORD                    vcn_RawKeySize;
  341.         UWORD                    vcn_DOSSize;    /* obsolete */
  342.         UWORD                    vcn_ASCSize;    /* obsolete */
  343.         UWORD                    vcn_CutSize;
  344.  
  345. /* ports, iorequests and signal masks */
  346.  
  347.         struct MsgPort         *vcn_WindowPort; /* not IDCMP, private!*/
  348.         ULONG                    vcn_WindowSignalMask;
  349.  
  350.         struct MsgPort          *vcn_DOSPort;    /* port of NULL owner */
  351.         ULONG                    vcn_DOSSignalMask;
  352.  
  353.         struct MsgPort          *vcn_IOPort;     /* generic port for
  354.                                                    IO interaction */
  355.         ULONG                    vcn_IOSignalMask;
  356.  
  357.         struct IOStdReq         *vcn_ConsoleIO; /* for console IO */
  358.         struct timerequest      *vcn_TimerIO;
  359.         struct IOStdReq         *vcn_InputIO;
  360.         struct IOStdReq         *vcn_UserIORequest;
  361.                                         /* given to user by dos packet */
  362.  
  363. /* colors and more. Added in V2.36 */
  364.  
  365.         UBYTE                    vcn_MenuDetailPen;
  366.         UBYTE                    vcn_MenuBlockPen;
  367.  
  368.         UBYTE                    vcn_GlobalRasterMask;
  369.                                         /* used to speed up drawing */
  370.  
  371.         UBYTE                    vcn_GlobalInvertMask;
  372.                                         /* used to draw the cursor */
  373.  
  374. /* gadgets and more. Please do not touch - these aren't the
  375.    actual gadgets if boopsis are available! */
  376.  
  377.         struct Gadget           *vcn_PropXGadget;
  378.         struct Gadget           *vcn_PropYGadget;
  379.         struct Gadget           *vcn_CommandGadget;     /* reserved */
  380.  
  381.         struct Menu             *vcn_Menu;      /* the menu in the window */
  382.  
  383.         void                    *vcn_MenuRemember;
  384.                                 /* memory management for menu structs,
  385.                                    ViNCEd internal, NOT INTUITION COMPATIBLE*/
  386.  
  387. /* link to the dos */
  388.  
  389.         struct DosPacket        *vcn_ActualDP;  /* packet in action */
  390.         ULONG                    vcn_longreserved;
  391.  
  392.         struct ViOwner          *vcn_ActualOwner; /* in foreground */
  393.         struct ViOwner          *vcn_BREAKOwner;  /* ^C whom ? */
  394.         struct ViOwner          *vcn_OpenOwner;   /* opened this window */
  395.  
  396. /* added these in 2.00 */
  397.  
  398.         struct DynLine          *vcn_DOSLine;   /* dos set cursor here */
  399.  
  400.         UWORD                    vcn_KeepOpenCounter;
  401.                                         /* window iconification forbid */
  402.         UWORD                    vcn_counterreserved;
  403.  
  404. /* added in 2.41 */
  405.  
  406.         UWORD                    vcn_TopRows;
  407.         UWORD                    vcn_BottomRows;
  408.                                         /* scrolling borders, CSI R */
  409.  
  410.         UWORD                    vcn_LeftColumns;
  411.         UWORD                    vcn_RightColumns;  /* not yet used */
  412.  
  413.         UWORD                    vcn_ItalicLeft;
  414.         UWORD                    vcn_ItalicRight;
  415.                                         /* additional room for
  416.                                            italic characters */
  417.  
  418. /* io requests for delay */
  419.  
  420.         struct timerequest      *vcn_PrivateTimerIO; /* intuition delay */
  421.         struct timerrequest     *vcn_DelayTimerIO;   /* for refresh */
  422.         struct timerrequest     *vcn_ScrollTimerIO;  /* for scrolling */
  423.         struct timerrequest     *vcn_BlinkTimerIO;   /* for cursor blinking */
  424.  
  425. /* delay times in micros, see prefs.h */
  426.  
  427.         ULONG                    vcn_DelayMicros;
  428.         ULONG                    vcn_RebuildMicros;
  429.         ULONG                    vcn_SlowMicros;
  430.         ULONG                    vcn_BlinkMicros;
  431.  
  432. /* time stamp the gadget was pressed down */
  433.  
  434.         ULONG                    vcn_TimeDown[2];
  435.  
  436. /* added in 3.00 */
  437.  
  438.         UWORD                    vcn_SelectedLeftOffset;
  439.         UWORD                    vcn_SelectedTopOffset;
  440.         UWORD                    vcn_SelectedWidth;
  441.         UWORD                    vcn_SelectedHeight;
  442.                                 /* borders set by CBM CSI sequences */
  443.  
  444. /* even more gadgets. DO NOT TOUCH! These aren't the actual gadgets
  445.    if boopsis are available ! */
  446.  
  447.         struct Gadget           *vcn_LeftGadget;
  448.         struct Gadget           *vcn_RightGadget;
  449.         struct Gadget           *vcn_UpGadget;
  450.         struct Gadget           *vcn_DownGadget; /* arrows */
  451.  
  452.         struct Gadget           *vcn_IconicGadget; /* iconification */
  453.  
  454.         struct Gadget           *vcn_FirstVNCGadget;
  455.                                         /* first private gadget added to
  456.                                            the window */
  457.         UWORD                    vcn_ViNCNumGads; /* number of gad's added */
  458.         UWORD                    vcn_ViNCGadPos;  /* at which position ?*/
  459.  
  460. /* dimensions of the sizing gadgets and arrows... */
  461.  
  462.         UWORD                    vcn_HorWidth;
  463.         UWORD                    vcn_HorHeight;
  464.         UWORD                    vcn_VertWidth;
  465.         UWORD                    vcn_VertHeight; /* arrow gadgets */
  466.  
  467.         UWORD                    vcn_SizingWidth;
  468.         UWORD                    vcn_SizingHeight;
  469.  
  470.         UWORD                    vcn_IconicWidth;
  471.         UWORD                    vcn_IconicHeight;
  472.  
  473.         UWORD                    vcn_LeftTitle;  /* free position near close */
  474.  
  475.         UWORD                    vcn_LeftButton; /* left edge of leftmost
  476.                                                     button, relative to
  477.                                                     rightmost edge */
  478.  
  479.         UWORD                    vcn_CloseWidth; /* width of the close
  480.                                                    gadget */
  481.  
  482.         UWORD                    vcn_DimReserved;
  483.  
  484.  
  485. /* Stuff needed for iconification */
  486.  
  487.         struct DiskObject       *vcn_IconicDOP; /* icon for iconification */
  488.         struct AppIcon          *vcn_AppIcon;   /* the code we got from WB */
  489.         UBYTE                    vcn_IconicCode;/* internal use... */
  490.         UBYTE                    vcn_IconcRes[3]; /* reserved */
  491.         char                    *vcn_IconTitle; /* the title */
  492.  
  493. /* complete (unpacked) colors */
  494.  
  495.         UBYTE                    vcn_UserExtAPen;
  496.         UBYTE                    vcn_UserExtBPen; /* user input colors */
  497.         UBYTE                    vcn_UserExtMode;
  498.         UBYTE                    vcn_UserExtReserved;
  499.  
  500.         UBYTE                    vcn_DOSExtAPen;
  501.         UBYTE                    vcn_DOSExtBPen;
  502.         UBYTE                    vcn_DOSExtMode; /* same for output */
  503.         UBYTE                    vcn_DOSExtReserved;
  504.  
  505.         UBYTE                    vcn_BackExtAPen; /* unused */
  506.         UBYTE                    vcn_BackExtBPen; /* backfill pen */
  507.         UBYTE                    vcn_BackExtMode; /* unused */
  508.         UBYTE                    vcn_BackExtReserved;
  509.  
  510. /* colors for rendering. Used by ViNCEd and SetVNC */
  511.  
  512.         UBYTE                    vcn_LightColor; /* shine pen */
  513.         UBYTE                    vcn_DarkColor;  /* shadow pen */
  514.         UBYTE                    vcn_FillColor;  /* background. =0 */
  515.         UBYTE                    vcn_TextColor;  /* used for text */
  516.         UBYTE                    vcn_MarkColor;  /* special text */
  517.         UBYTE                    vcn_ArrowColor; /* colors of arrows */
  518.         UBYTE                    vcn_ArrowLight;
  519.         UBYTE                    vcn_ArrowDark; /* usually shine & shadow
  520.                                                    but not in 1.2/1.3 */
  521.         UBYTE                    vcn_FillTextColor; /* text in the bar */
  522.         UBYTE                    vcn_reservedCols[3];
  523.  
  524. /* even more master pointers for the DynLines. Get relocated if
  525.    lines move. For private use only! */
  526.  
  527.         struct DynLine          *vcn_LinePtrA;
  528.         struct DynLine          *vcn_LinePtrB;
  529.         struct DynLine          *vcn_LinePtrC;
  530.  
  531. /* screen support */
  532.  
  533.         ULONG                    vcn_ScreenSignalMask;
  534.         UBYTE                    vcn_ScreenSignalBit; /* for pubscreen
  535.                                                         close */
  536.         UBYTE                    vcn_ScreenRes[3];
  537.  
  538.         struct Screen           *vcn_PubScreen; /* our public screen again,
  539.                                                    if open */
  540.         struct TextAttr          vcn_PrivAttr;  /* not used, but reserved */
  541.  
  542.         struct ViNCNewWindow    *vcn_LastNewWindow;
  543.                                                 /* used for re-opening */
  544.  
  545. /* final (ready for use) titles after parsing */
  546.  
  547.         char                    *vcn_FinalTitle;
  548.         char                    *vcn_FinalScreenTitle;
  549.         char                    *vcn_FinalIconTitle;
  550.  
  551. /* again screen support */
  552.  
  553.         ULONG                    vcn_DefaultModeID; /* for screens */
  554.         struct ViColorEntry      vcn_Colors[16];    /* current colors */
  555.  
  556.  
  557. /* TABHook support */
  558.  
  559.         struct MsgPort          *vcn_TABHookPort;   /* for communications
  560.                                                        with the ViNCFiler */
  561.  
  562.         void                    *vnc_TABObs1;
  563.         void                    *vnc_TABObs2;       /* no longer used */
  564.  
  565.  
  566.         ULONG                    vcn_TABTime[2]; /* time of last TAB */
  567.         ULONG                    vcn_TABFlags;  /* private flags for the TABHook */
  568.         struct MinList           vcn_TABExpansionList; /* what has been
  569.                                                          found */
  570.         void                    *vcn_TABCurrentNode;
  571.                                                 /* do not care about it */
  572.  
  573.         struct ViOwner          *vcn_TABOwner;  /* who pressed TAB ?*/
  574.  
  575.         UWORD                    vcn_TABLineLen;
  576.         UWORD                    vcn_TABCursorPos; /* and where ?*/
  577.  
  578.         char                    *vcn_TABPatBuf; /* expanded pattern. */
  579.         char                    *vcn_TABRemainder;
  580.  
  581.         UWORD                    vcn_GluePos; /* where to glue in again */
  582.         UWORD                    vcn_ArgNum; /* which argument to expand */
  583.         UWORD                    vcn_PatPos; /* where's #? ?*/
  584.         UWORD                    vcn_TABReserved;
  585.  
  586.         struct AppWindow        *vcn_AppWindow; /* for icon drop */
  587.         BPTR                     vcn_TABLock;   /* expansion list is
  588.                                                    relative to this one */
  589.  
  590.         UWORD                    vcn_PathOnlyQualifier;
  591.         UWORD                    vcn_NameOnlyQualifier;
  592.  
  593. /* more color support */
  594.  
  595.         UBYTE                   *vnc_ANSIPenColors[32]; /* 16 for the pens, */
  596.                                                         /* 16 for the block hilite */
  597.         UBYTE                   *vcn_ANSIAlloc[32];     /* Each byte for an */
  598.                                                         /* allocated pen */
  599. /* default pens saved with CSI SPC s */
  600.  
  601.         UBYTE                   vcn_DefaultExtAPen;
  602.         UBYTE                   vcn_DefaultExtBPen;
  603.         UBYTE                   vcn_DefaultExtMode;
  604.         UBYTE                   vcn_DefaultExtReserved;
  605.  
  606. /* default colors */
  607.  
  608.         struct ViColorEntry     vcn_DefaultColors[16];
  609.         struct ViColorEntry     vcn_CursorColor;
  610.         struct ViColorEntry     vcn_DefaultCursorColor;
  611.  
  612.         /* private fields beyond this point, do not read!
  613.            do not allocate yourself, use AllocCNWindow() ! */
  614. };
  615.  
  616. /* The next node is definitly for your private use! ViNCEd does not
  617.    touch it, except for one line master pointer that gets adjusted if
  618.    the line moves... */
  619.  
  620. /* Valid flags in vcn_Flags can be found in vpf_Flags, see Prefs.h.
  621.    Same goes for vcn_DOSFlags.
  622.    ExtFlags are for internal use. Not documented cause they will
  623.    change in the future.... */
  624.  
  625. /* Refresh modes... */
  626.  
  627. /* horizontal line */
  628. #define VCNR_HOR_BIT    0
  629.  
  630. /* vertical screen */
  631. #define VCNR_VERT_BIT   1
  632.  
  633. /* total refresh */
  634. #define VCNR_TOTAL_BIT  2
  635.  
  636. /* layer must be refreshed */
  637. #define VCNR_LAYER_BIT  3
  638.  
  639. /* currently refreshing */
  640. #define VCNR_REFRESHING_BIT 6
  641.  
  642. /* masking forbidden, gets calculated */
  643. #define VNCR_FULLMASK_BIT 7
  644.  
  645.  
  646. struct ViUserNode {
  647.         struct ViNCWindow       *ucn_Window; /* points back to structure
  648.                                                 above */
  649.  
  650.         struct VNCBase          *ucn_LibBase; /* library base */
  651.  
  652.         struct DynLine          *ucn_UserLinePtr; /* gets updated.
  653.                                                      Keep line ptrs
  654.                                                      here! */
  655.  
  656.         ULONG                    ucn_UserData;
  657.         void                    *ucn_UserPtr;
  658.  
  659.         struct List              ucn_UserList;  /* Not initialized! */
  660.  
  661.         UWORD                    ucn_UserReserved; /* don't touch this! */
  662.         UWORD                    ucn_UserCount;
  663.  
  664.         UWORD                    ucn_UserX;
  665.         UWORD                    ucn_UserY;
  666. };
  667.  
  668.  
  669.  
  670.  
  671.  
  672. /* The next one is used for OpenAWindow(), to attach an intuition window
  673.    to a ViNCWindow */
  674.  
  675. struct ViNCNewWindow {
  676.         WORD                     vnw_LeftEdge;
  677.         WORD                     vnw_TopEdge; /* position. Set top to -1
  678.                                                  to adjust to drag bar */
  679.         WORD                     vnw_Width;
  680.         WORD                     vnw_Height; /* size. Set to -1 to get
  681.                                                 maximal size */
  682.  
  683.         UBYTE                    vnw_Pens[2]; /* reserved. Must be -1,-1 */
  684.  
  685.         ULONG                    vnw_ViNCFlags; /* see below. No IDCMP! */
  686.  
  687.         /* note that no IDCMP flags are here! ViNCEd does not use the
  688.            IDCMP, instead an input handler is used ! */
  689.  
  690.         ULONG                    vnw_WindowFlags;
  691.                                                 /* passed to intuition as
  692.                                                    window flags */
  693.         WORD                     vnw_AltLeftEdge;
  694.         WORD                     vnw_AltTopEdge;
  695.         WORD                     vnw_AltWidth;
  696.         WORD                     vnw_AltHeight; /* alternate position */
  697.  
  698.         char                    *vnw_Title;
  699.  
  700.         void                    *vnw_Screen;
  701.                         /* pointer to intuition screen, or name of
  702.                            public screen */
  703.  
  704.         struct BitMap           *vnw_BitMap; /* for superbitmap. Not tested */
  705.  
  706.         WORD                     vnw_MinWidth,vnw_MinHeight;
  707.         WORD                     vnw_MaxWidth,vnw_MaxHeight;
  708.                 /* set to -1,-1 for maximal dimension! */
  709.  
  710.         UWORD                    vnw_Type;
  711.  
  712.         struct TagItem          *vnw_Tags;      /* expand on your own */
  713.  
  714.         struct Window           *vnw_UserWindow;
  715.                                                 /* set to install in own
  716.                                                    window */
  717.  
  718.         char                    *vnw_ScreenTitle;
  719.  
  720.         ULONG                    vnw_MonitorID; /* for private screens */
  721.         UWORD                    vnw_Depth;     /* for depth of screen */
  722.  
  723.         UBYTE                    vnw_Cols,vnw_Rows;
  724.                                         /* dimensions in characters, if
  725.                                            not zero */
  726.  
  727.         struct TextFont         *vnw_TextFont;
  728.                                         /* Text Font to use */
  729. };
  730.  
  731. /* Useful screen types */
  732.  
  733. /* open on workbench or on ViNCEd screen (set proper flags, see below) */
  734. #define VNW_STYPE_WORKBENCH     1
  735.  
  736. /* open on custom screen */
  737. #define VNW_STYPE_CUSTOM        15
  738.  
  739. /* open on public screen */
  740. #define VNW_STYPE_PUBLIC        2
  741.  
  742.  
  743. /* Add the standard menu */
  744. #define VNW_ADDMENU_BIT         30
  745. #define VNW_ADDMENU_MASK        (1L<<30)
  746.  
  747. /* Add X prop gadget */
  748. #define VNW_ADDPROPX_BIT        29
  749. #define VNW_ADDPROPX_MASK       (1L<<29)
  750.  
  751. /* Add Y prop gadget */
  752. #define VNW_ADDPROPY_BIT        28
  753. #define VNW_ADDPROPY_MASK       (1L<<28)
  754.  
  755. /* Fall back to WB if custom/public screen not available */
  756. #define VNW_PUBFALLBACK_BIT     27
  757. #define VNW_PUBFALLBACK_MASK    (1L<<27)
  758.  
  759. /* screen title available */
  760. #define VNW_WITHTITLE_BIT       26
  761. #define VNW_WITHTITLE_MASK      (1L<<26)
  762.  
  763. /* chunky graphics ? */
  764. #define VNW_CHUNKYPIXEL_BIT     25
  765. #define VNW_CHUNKYPIXEL_MASK    (1L<<25)
  766.  
  767. /* shell window ? */
  768. #define VNW_SHELL_BIT           24
  769. #define VNW_SHELL_MASK          (1L<<24)
  770.  
  771. /* add buttons ? */
  772. #define VNW_ADDBUTTONS_BIT      23
  773. #define VNW_ADDBUTTONS_MASK     (1L<<23)
  774.  
  775. /* add iconify ? */
  776. #define VNW_ADDICONIC_BIT       22
  777. #define VNW_ADDICONIC_MASK      (1L<<22)
  778.  
  779. /* open on own screen? Set type to VNW_STYPE_WORKBENCH in this case */
  780. #define VNW_PRIVSCREEN_BIT      21
  781. #define VNW_PRIVSCREEN_MASK     (1L<<21)
  782.  
  783. /* remove dragbar ?*/
  784. #define VNW_NODRAGBAR_BIT       20
  785. #define VNW_NODRAGBAR_MASK      (1L<<20)
  786.  
  787. /* keep user window open ?*/
  788. #define VNW_KEEPOPEN_BIT        19
  789. #define VNW_KEEPOPEN_MASK       (1L<<19)
  790.  
  791. #endif
  792.